﻿<UserControl x:Class="Bookworm.Controls.CustomControls.EBookNoteCard"
             x:Name="NoteCard"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:thriple="http://thriple.codeplex.com/"
             xmlns:i="clr-namespace:Microsoft.Expression.Interactivity;assembly=Microsoft.Expression.Interactivity"
             xmlns:local="clr-namespace:Bookworm.Controls"
             >        
    <Grid Background="{x:Null}" DataContext="{Binding ElementName=NoteCard}">
        <thriple:ContentControl3D x:Name="Ebook3D" 
                                  EasingMode="Dip"                             
                                  >
            <thriple:ContentControl3D.Content>
                <DockPanel x:Name="dkBookItem1" Margin="0,40,0,40">
                    <Border DockPanel.Dock="Top" 
                            SnapsToDevicePixels="True" 
                            x:Name="brBookItemBorder11"
                            Opacity=".85"                             
                            BorderThickness="1,1,1,1"                            
                            OpacityMask="{x:Null}"
                            CornerRadius="15,15,15,15"
                            BorderBrush="#FFECD903"
                            Background="{DynamicResource BWDefault.NoteCardBrush}">
                        <Grid Background="Transparent" Margin="10,10,10,10">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <StackPanel Grid.ColumnSpan="3" Orientation="Horizontal">
                                <TextBlock Text="{Binding Path=Title}"                                                                                                                                                                             
                                       Style="{DynamicResource BWDefault.TextTitle}"
                                       /> 
                                    <Button x:Name="btnFlipNoteCard11"
                                ToolTip="Click for details"
                                Grid.Row="2"
                                Grid.Column="2"
                                Command="thriple:ContentControl3D.RotateCommand"
                                Style="{DynamicResource BWDefault.Button}">
                            <Path Data="M 0 0 L 8 4 L 0 8 Z"
                                  Fill="#FF000000"/>
                        </Button>
                                    </StackPanel>
                            <DockPanel Grid.Row="1" 
                                       Grid.RowSpan="2"
                                       HorizontalAlignment="Left"
                                       Margin="5,5,5,5" 
                                       Opacity="0.8">
                                <Border x:Name="brBookItem1"
                                        DockPanel.Dock="Top"
                                        BorderThickness="5">
                                    <Image Source="{Binding Path=Image}"
                                           Height="80"
                                           Width="50"
                                           Stretch="Fill"
                                           HorizontalAlignment="Center"
                                           VerticalAlignment="Stretch" 
                                           Opacity="1"
                                           x:Name="frontCover1"/>
                                </Border>
                            </DockPanel>
                            <StackPanel Grid.Column="1" 
                                        Grid.Row="1" 
                                        Margin="5,5,5,5"
                                        SnapsToDevicePixels="True" 
                                        Grid.RowSpan="2">
                                <TextBlock Style="{DynamicResource BWDefault.TextNormal}"
                                   Text="{Binding Path=Author}"/>
                        </StackPanel>
                        </Grid>
                    </Border>
                </DockPanel>
            </thriple:ContentControl3D.Content>
            <thriple:ContentControl3D.BackContent>            
                <DockPanel x:Name="dkBookItem" Margin="0,40,0,40">
                    <Border DockPanel.Dock="Top" 
                            SnapsToDevicePixels="True" 
                            x:Name="brBookItemBorder1"
                            Opacity=".85"                             
                            BorderThickness="1,1,1,1"                            
                            OpacityMask="{x:Null}"
                            CornerRadius="15,15,15,15"
                            BorderBrush="#FFECD903"
                            Background="{DynamicResource BWDefault.NoteCardBrush}">                                             
                        <Grid Background="Transparent" Margin="10,10,10,10">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>                               
                            </Grid.ColumnDefinitions>
                                <StackPanel Grid.ColumnSpan="3" Orientation="Horizontal">
                            <TextBlock Text="{Binding Path=Title}"                                                                                                                                                                             
                                       Style="{DynamicResource BWDefault.TextTitle}"
                                       /> 
                                    <Button x:Name="btnFlipNoteCard1"
                                ToolTip="Click for details"
                                Grid.Row="2"
                                Grid.Column="2"
                                Command="thriple:ContentControl3D.RotateCommand"
                                Style="{DynamicResource BWDefault.Button}">
                            <Path Data="M 0 0 L 8 4 L 0 8 Z"
                                  Fill="#FF000000"/>
                        </Button>
                                    </StackPanel>
                            <DockPanel Grid.Row="1" 
                                       Grid.RowSpan="2"
                                       HorizontalAlignment="Left"
                                       Margin="5,5,5,5" 
                                       Opacity="0.8">                                
                                <Border x:Name="brBookItem"
                                        DockPanel.Dock="Top"
                                        BorderThickness="5">
                                    <Image Source="{Binding Path=Image}"
                                           Height="80"
                                           Width="50"
                                           Stretch="Fill"
                                           HorizontalAlignment="Center"
                                           VerticalAlignment="Stretch" 
                                           Opacity="1"
                                           x:Name="frontCover"/>
                                </Border>                            
                            </DockPanel>
                            <StackPanel Grid.Column="1" 
                                        Grid.Row="1" 
                                        Margin="5,5,5,5"
                                        SnapsToDevicePixels="True" 
                                        Grid.RowSpan="2">
                                <TextBlock Style="{DynamicResource BWDefault.TextNormal}"
                                   Text="{Binding Path=Author}"/>
                        </StackPanel>                            
                        </Grid>
                    </Border>                   
                    </DockPanel>                               
            </thriple:ContentControl3D.BackContent>
        </thriple:ContentControl3D>               
    </Grid>
        
</UserControl>
